﻿
namespace SharpDepend
{
    public interface ISocketServer
    {
        void Constructor(string ip, int port);

        /// <summary>
        /// Accept clients. If this method return null or thrown an exception
        /// <para>the BaseSocketCommunication will disconnect automatic.</para>
        /// </summary>
        /// <returns>Socket client.</returns>
        ISocketClient AcceptTcpClient();

        void Start();

        void Stop();
    }

    public interface ISocketServerManager
    {
        ISocketServer CreateServer(string ip, int port);

        /// <summary>
        /// Get local ip. Null if no ip address is available.
        /// </summary>
        string LocalIp { get; }
    }
}
